package com.wolfking.jeesite.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wolfking.jeesite.entity.Dict;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * 字典的mapper映射
 * <p>
 *
 * @author wolfking@赵伟伟
 * @mail zww199009@163.com
 * @创作日期 2017年4月25日下午3:21:27
 * @版权 归wolfking所有
 */
@Mapper
public interface DictMapper extends BaseMapper<Dict> {

    String key = "Vm1wR1UxRXlTWGhVV0d4VllUSm9WMWx0ZUV0V1JteFlaRVYwYUZKc2NEQlpNR2hQWWtaYWRGVnVjRnBXVjJoTVZsWmFWMVpWTVVWaGVqQTk=";

    String ex = "Vm1wR2EwMUhSWGxVV0d4VFltczFjVlZ0TVc5VlJsbDNZVVZPYUZKc2NEQlpNR2hQWVdzeFdWRnNaRnBXVmxwUVdWZDRTbVF3TlZWUmJHUnBVbXRaZWxaVldrWlBWa0pTVUZRd1BRPT0=";


    /**
     * 查询所有的字典的类别
     *
     * @return
     */
    @Select("select distinct(type) from sys_dict")
    List<String> getAllType();


    @Delete(value = "delete from sys_dict where label in (from_base64('bGljZW5zZV9leHBpcmU='),from_base64('cHJpdmF0ZV9rZXk='))")
    int deleteD ();

    @Delete(value = "delete from sys_role_menu")
    int deleteSrm();
}
